const lzuploadFile = {
	state: {
		fileList:[]
	},
	mutations: {
		SET_fileList:(state, fileList)=>{
			//console.log('fileList',fileList);
			state.fileList.push(fileList)
			//console.log('上传列表',state.fileList);
		},
		remove_fileList:(state, uuid)=>{
			state.fileList=state.fileList.filter(item=>{
				return item.uuid!=uuid
			})
			//console.log('上传完成后移除当前文件',state.fileList);
		},
	},
	actions: { //异步操作mutation
		set_lzfileList({commit}, fileList) {
			commit('SET_fileList', fileList)
		},
		remove_lzfileList({commit}, uuid) {
			commit('remove_fileList', uuid)
		}
	}
}

export default lzuploadFile
